﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Entity
{
    public class Base
    {
        public Base()
        {
            this.ID = Guid.NewGuid();
            this.IsLock = false;
            this.IsDelete = false;
            this.CreatTime = DateTime.Now;
        }
        /// <summary>
        /// 自增ID
        /// </summary>
        //[Key]
        //[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //public int AutoID { get; set; }
        [Column("A01")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid ID { get; set; }
        [Column("A02")]
        
        /// <summary>
        /// 是否被锁定
        /// </summary>
        public Boolean IsLock { get; set; }
        [Column("A03")]
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDelete { get; set; }
        [Column("A04")]
        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        public DateTime CreatTime { get; set; }
    }
}
